package com.wuliupai.delivery.wuliupaidelivery.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Descriptions：支付用的实体类
 * <p>
 * Author：ChenME
 * Date：2017/1/16
 * Email：ibelieve1210@163.com
 */
public class PayBean implements Parcelable {

    /**
     * 支付类型
     */
    private String payType;

    /**
     * 第1栏支付金额（单位：分）
     */
    private long chargeLine1;

    /**
     * 第2栏支付金额（单位：分）
     */
    private long chargeLine2 = 0;

    public PayBean(String payType, long chargeLine1) {
        this.chargeLine1 = chargeLine1;
        this.payType = payType;
    }

    @Override
    public String toString() {
        return "PayBean{" +
                "payType='" + payType + '\'' +
                ", chargeLine1=" + chargeLine1 +
                ", chargeLine2=" + chargeLine2 +
                '}';
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public long getChargeLine1() {
        return chargeLine1;
    }

    public void setChargeLine1(long chargeLine1) {
        this.chargeLine1 = chargeLine1;
    }

    public long getChargeLine2() {
        return chargeLine2;
    }

    public void setChargeLine2(long chargeLine2) {
        this.chargeLine2 = chargeLine2;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.payType);
        dest.writeLong(this.chargeLine1);
        dest.writeLong(this.chargeLine2);
    }

    public PayBean() {
    }

    protected PayBean(Parcel in) {
        this.payType = in.readString();
        this.chargeLine1 = in.readLong();
        this.chargeLine2 = in.readLong();
    }

    public static final Creator<PayBean> CREATOR = new Creator<PayBean>() {
        @Override
        public PayBean createFromParcel(Parcel source) {
            return new PayBean(source);
        }

        @Override
        public PayBean[] newArray(int size) {
            return new PayBean[size];
        }
    };
}